﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	
	<Storyboard x:Key="MouseOverStoryboard">
				<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border">
								<EasingColorKeyFrame KeyTime="0" Value="#FFE4F5FC"/>
							</ColorAnimationUsingKeyFrames>
							<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border">
								<EasingColorKeyFrame KeyTime="0" Value="#FF29B0ED"/>
							</ColorAnimationUsingKeyFrames>
							<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="border">
								<EasingColorKeyFrame KeyTime="0" Value="#FFBEE8F9"/>
							</ColorAnimationUsingKeyFrames>
							<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="border">
								<EasingColorKeyFrame KeyTime="0" Value="#FFA0D8EF"/>
							</ColorAnimationUsingKeyFrames>
							<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border">
								<EasingColorKeyFrame KeyTime="0" Value="#FF34A7DB"/>
							</ColorAnimationUsingKeyFrames>
	</Storyboard>
	<Storyboard x:Key="PressedStoryboard">
		<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border">
								<EasingColorKeyFrame KeyTime="0" Value="#FF0D4258"/>
							</ColorAnimationUsingKeyFrames>
							<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border">
								<EasingColorKeyFrame KeyTime="0" Value="#FF50A4C6"/>
							</ColorAnimationUsingKeyFrames>
							<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="border">
								<EasingColorKeyFrame KeyTime="0" Value="#FF34809F"/>
							</ColorAnimationUsingKeyFrames>
							<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="border">
								<EasingColorKeyFrame KeyTime="0" Value="#FF34809F"/>
							</ColorAnimationUsingKeyFrames>
	</Storyboard>
	
	<ControlTemplate x:Key="MinimizeButton" TargetType="{x:Type Button}">
		<Grid>
			<VisualStateManager.VisualStateGroups>
				<VisualStateGroup x:Name="CommonStates">
					<VisualStateGroup.Transitions>
						<VisualTransition GeneratedDuration="0" To="Pressed"/>
					</VisualStateGroup.Transitions>
					<VisualState x:Name="Normal"/>
					<VisualState x:Name="MouseOver" Storyboard="{DynamicResource MouseOverStoryboard}">						
					</VisualState>
					<VisualState x:Name="Pressed" Storyboard="{DynamicResource PressedStoryboard}">					
					</VisualState>
					<VisualState x:Name="Disabled"/>
				</VisualStateGroup>
			</VisualStateManager.VisualStateGroups>
			<Border BorderThickness="1,1,0,1" BorderBrush="Black" CornerRadius="2,0,0,2">
				<Border.Background>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FFECECEC" Offset="0"/>
						<GradientStop Color="White" Offset="1"/>
						<GradientStop Color="#FFC6C6C6" Offset="0.499"/>
						<GradientStop Color="#FFB8B8B8" Offset="0.5"/>
					</LinearGradientBrush>
				</Border.Background>
				<Border x:Name="border" CornerRadius="2,0,0,2" BorderThickness="1" BorderBrush="#7FFFFFFF">
					<Border.Background>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<GradientStop Color="#00E4F5FC"/>
							<GradientStop Color="#0029B0ED" Offset="1"/>
							<GradientStop Color="#00A0D8EF" Offset="0.501"/>
							<GradientStop Color="#00BEE8F9" Offset="0.5"/>
						</LinearGradientBrush>
					</Border.Background>				
				</Border>
			</Border>
			<Border Height="5" Width="12" BorderBrush="Black" BorderThickness="1" Margin="1,0,0,4" VerticalAlignment="Bottom" HorizontalAlignment="Center" CornerRadius="1">
				<Border.Background>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FFCACACA" Offset="1"/>
						<GradientStop Color="White"/>
					</LinearGradientBrush>
				</Border.Background>
			</Border>
		</Grid>
	</ControlTemplate>
	
	
	<Style x:Key="MaximizeButton" TargetType="{x:Type Button}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<Grid>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver" Storyboard="{DynamicResource MouseOverStoryboard}">									
								</VisualState>
								<VisualState x:Name="Pressed" Storyboard="{DynamicResource PressedStoryboard}">									
								</VisualState>
								<VisualState x:Name="Disabled"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Border BorderThickness="1" BorderBrush="Black" CornerRadius="0">
							<Border.Background>
								<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
									<GradientStop Color="#FFECECEC" Offset="0"/>
									<GradientStop Color="White" Offset="1"/>
									<GradientStop Color="#FFC6C6C6" Offset="0.499"/>
									<GradientStop Color="#FFB8B8B8" Offset="0.5"/>
								</LinearGradientBrush>
							</Border.Background>
							<Border x:Name="border" BorderThickness="1" BorderBrush="#7FFFFFFF">
								<Border.Background>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#00E4F5FC"/>
										<GradientStop Color="#0029B0ED" Offset="1"/>
										<GradientStop Color="#00A0D8EF" Offset="0.501"/>
										<GradientStop Color="#00BEE8F9" Offset="0.5"/>
									</LinearGradientBrush>
								</Border.Background>				
							</Border>
						</Border>
						<Image Source="Images/max.png" Width="12" Height="11" VerticalAlignment="Stretch" Margin="1,1,0,0"/>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsFocused" Value="True"/>
						<Trigger Property="IsDefaulted" Value="True"/>
						<Trigger Property="IsMouseOver" Value="True"/>
						<Trigger Property="IsPressed" Value="True"/>
						<Trigger Property="IsEnabled" Value="False"/>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	
	<Style x:Key="ColseButton" TargetType="{x:Type Button}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<Grid>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border">
											<EasingColorKeyFrame KeyTime="0" Value="#00E4F5FC"/>
										</ColorAnimationUsingKeyFrames>
										<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border">
											<EasingColorKeyFrame KeyTime="0" Value="#00E4F5FC"/>
										</ColorAnimationUsingKeyFrames>
										<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="border">
											<EasingColorKeyFrame KeyTime="0" Value="#FFB10000"/>
										</ColorAnimationUsingKeyFrames>
										<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="border">
											<EasingColorKeyFrame KeyTime="0" Value="#FFCA0707"/>
										</ColorAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed">
									<Storyboard>
										<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border">
											<EasingColorKeyFrame KeyTime="0" Value="#FF741B0F"/>
										</ColorAnimationUsingKeyFrames>
										<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="border">
											<EasingColorKeyFrame KeyTime="0" Value="#FF8F2C16"/>
										</ColorAnimationUsingKeyFrames>
										<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border">
											<EasingColorKeyFrame KeyTime="0" Value="#FFAB4436"/>
										</ColorAnimationUsingKeyFrames>
										<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="border">
											<EasingColorKeyFrame KeyTime="0" Value="#FF932C1E"/>
										</ColorAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Border x:Name="border" BorderThickness="0,1,1,1" BorderBrush="Black" CornerRadius="0,2,2,0">
							<Border.Background>
								<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
									<GradientStop Color="#FFE0968C" Offset="0"/>
									<GradientStop Color="#FFce6b5d" Offset="1"/>
									<GradientStop Color="#FFcf654f" Offset="0.499"/>
									<GradientStop Color="#FFc03b1f" Offset="0.5"/>
								</LinearGradientBrush>
							</Border.Background>
							<Border  CornerRadius="0,2,2,0" BorderThickness="1" BorderBrush="#7FFFFFFF">
												
							</Border>
						</Border>
						
						<Image Width="12" Height="11" Source="Images/colse.png"/>
						
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsFocused" Value="True"/>
						<Trigger Property="IsDefaulted" Value="True"/>
						<Trigger Property="IsMouseOver" Value="True"/>
						<Trigger Property="IsPressed" Value="True"/>
						<Trigger Property="IsEnabled" Value="False"/>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<!-- 应该在此定义资源字典条目。-->
</ResourceDictionary>